package org.myxdb.client.cmdtoken;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Vector;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;

public class xmlrpc {
	
	public static XmlRpcClient client = new XmlRpcClient();
	public static void init()
	{	
	    try {
            // config client

            XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();

            config.setEnabledForExtensions(true);
            
            config.setServerURL(new URL("http://localhost:8080/myxdb/MyXdbServer"));      // should be modified according to your configuration of jsp container
            
            config.setBasicUserName("admin");
            
            config.setBasicPassword("admin");

            // create a new XmlRpcClient object and bind above config object with it


            client.setConfig(config);
          

      } catch (MalformedURLException e) {

            System.out.println(e.toString());

      } catch (IOException e) {

            e.printStackTrace();

      }

}
	}

